﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PMS
{
    public partial class DoFunction : System.Web.UI.Page
    {
        protected string fid;
        protected void Page_Load(object sender, EventArgs e)
        {
            fid = Request.QueryString["id"];
            if (fid == "0")
            {
                Session.Abandon();
                Response.Write("<script>parent.document.URL='Default.aspx';</script>");
                return;
            }
            else if (fid == "1")
            {
                Response.Redirect("store/YFL_In.aspx");
            }
            else if (fid == "2")
            {
                Response.Redirect("store/YFL_Out.aspx");
            }
            else if (fid == "3")
            {
                Response.Redirect("store/cailiao_in.aspx");
            }
            else if (fid == "4")
            {
                Response.Redirect("store/cailiao_out.aspx");
            }
            else if (fid == "5")
            {
                Response.Redirect("store/beipin_in.aspx");
            }
            else if (fid == "6")
            {
                Response.Redirect("store/beipin_out.aspx");
            }
            else if (fid == "7")
            {
                Response.Redirect("store/chanpin_io.aspx");
            }
            else if (fid == "8")
            {
                Response.Redirect("store/chanpin_io.aspx?io=out");
            }
            else if (fid == "9")
            {
                Response.Redirect("store/ChanPin_Report.aspx");
            }
            else if (fid == "10")
            {
                Response.Redirect("store/ChanPin_kucun.aspx");
            }
            else if (fid == "101")
            {
                Response.Redirect("Sale/FindSaleContract.aspx");
            }
            else if (fid == "102")
            {
                Response.Redirect("Sale/FindPurchaseContract.aspx");
            }
            else if (fid == "103")
            {
                Response.Redirect("Sale/FindProduct.aspx");
            }
            else if (fid == "104")
            {
                Response.Redirect("Sale/FindCustomer.aspx");
            }
            else if (fid == "105")
            {
                Response.Redirect("Sale/FindCustomer.aspx?CustomerType=2");
            }
            else if (fid == "106")
            {
                Response.Redirect("Sale/CreateCustomer.aspx?CustomerType=1");
            }
            else if (fid == "107")
            {
                Response.Redirect("Sale/CreateCustomer.aspx?CustomerType=2");
            }  
             else if (fid == "110")
            {
                Response.Redirect("Sale/AddSaleContract.aspx");
            }
            else if (fid == "111")
            {
                Response.Redirect("Sale/AddPurchasingContract.aspx");
            }  

            
        }
    }
}
